<template>
  <div>
    <base-dialog class="dialog_box" width="80%" :visible.sync="dialog.visible" :title="dialog.title" :loading="dialog.loading" :disabled="dialog.disabled" :show-default-footer="false" @updateData="updateData" @open="beforeOpenDialog">
      <div align="center">
        <span slot="footer" class="dialog-footer">
          <el-button size="medium" icon="el-icon-check" style="width: 100px;height: 35px;background-color: #48B94D;color: #FFFFFF;" @click="updateData">保存</el-button>
          <el-button size="medium" icon="el-icon-check" style="width: 100px;height: 35px;background-color: #48B94D;color: #FFFFFF;" @click="updateData">批量操作</el-button>
          <el-button size="medium" icon="el-icon-close" style="width: 100px;height: 35px;background-color: #E05252;color: #FFFFFF;" @click="dialog.visible = false">关闭</el-button>
        </span>
      </div>
      <el-form ref="dataForm" :model="dialog.form" :disabled="dialog.disabled" label-width="100px">
        <el-table v-loading="loading" :data="tableData" highlight-current-row height="100%" style="flex:1;" border stripe @row-click="rowClick">
          <el-table-column type="index" label="序号" sortable width="70" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="线路" sortable min-width="90" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="行别" sortable min-width="90" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="区站" sortable min-width="90" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="支柱号" sortable min-width="90" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="公里标" sortable min-width="90" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="分析日期" sortable min-width="90" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="分析人" sortable min-width="90" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="是否漏拍" sortable min-width="90" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="漏拍部位" sortable min-width="90" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="备注" sortable min-width="90" show-overflow-tooltip align="center" />
          <el-table-column prop="cType" label="完成情况" sortable min-width="90" show-overflow-tooltip align="center" />
        </el-table>
      </el-form>
    </base-dialog>
  </div>
</template>
<script>
export default {
  components: { },
  props: {
    dialog: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  data() {
    return {

    }
  },
  watch: {
    'dialog.visible'() {
      if (this.dialog.visible) {
        this.getList()
      }
    }
  },
  methods: {
    // 点击某行
    rowClick(row, column, event) {
      this.ishowtan = true
      this.tableItemData = row.detectLineList
    },
    // 回调方法
    updateData() {
      this.$refs.dataForm.validate((valid) => {
        if (valid) {
          this.dialog.loading = true
          this.$emit('updateData', this.dialog.form)
        }
      })
    },
    // 初始化
    beforeOpenDialog() {
      this.$nextTick(() => {

      })
    }
  }
}
</script>
<style lang="scss">
.text {
  font-size: 12px;
}

.item {
  //margin-bottom: 18px;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both
}

.box-card {
  width: 31%;
  float: left;
  margin-left: 1%;
  margin-right: 1%;
  margin-top: 10px;
  margin-bottom: 5px;
}
.el-card  .el-card__header {
  height: 50px;
  padding: 8px 20px;
  border-bottom: 1px solid #EBEEF5;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-size: 16px;
  background-color: #0000FF;
}
//.el-card  .el-card__body {
//  padding: 6px;
//}
//.el-transfer-panel .el-transfer-panel__header {
//  //margin-left: -100px;
//  padding-left: -100px;
//}
#transfer-panel-left{
  width: 200px;
}
#transfer-panel-right{
  width: 320px;
}
.el-input-number{
  margin-left: 20px;
}
.el-transfer-panel__item{
  height: 35px;
  //margin-bottom: 5px;
}
</style>
